﻿using System;
using System.Collections.Generic;

class ReadNumberMethod
{
    static void Main()
    {
        try
        {
            int start = 1;
            int end = 100;

            for (int i = 1; i <= 10; i++)
            {
                Console.Write("Enter number {0}: ", i);
                int number = int.Parse(Console.ReadLine());

                ReadNumbers(number, start, end);

                start = number;
            }
        }
        catch (FormatException)
        {
            throw new FormatException("Not a number!");
        }
        catch (OverflowException)
        {
            throw new OverflowException("The input number is out of limits!");
        }
        finally
        {
            Console.WriteLine("Goodbye!");
        }
    }
    
    static void ReadNumbers(int number, int start, int end)
    {
        if (number > start && number < end)
        {
            Console.WriteLine("You entered {0}",number);
        }
        else
        {
            throw new ArithmeticException("Out of boundary number!");
        }
    }
}